package com.cls.system.mapper;

import com.cls.system.entity.ConfigureQualification;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 申报/主持人配置表 Mapper
 *
 * @author slx
 * @date 2020-11-17 11:51:28
 */
@Repository
public interface ConfigureQualificationMapper extends BaseMapper<ConfigureQualification> {

    @Select("select * from sys_configure_qualification where configure_id = #{configureId} and level_type_code = #{levelType} and is_delete = 0 and is_publish = true limit 1")
    ConfigureQualification findByConfigureIdAndLevelType(@Param("configureId") Long configureId, @Param("levelType") String levelType);

    @Select("select * from sys_configure_qualification where configure_id = #{ConfigureId} and is_delete = 0 and is_publish = true ")
    List<ConfigureQualification> findByConfigureId(@Param("ConfigureId") Long ConfigureId);
}
